package com.thesis.service.impl;

import com.thesis.dao.SysUserMapper;
import com.thesis.entity.SysUser;
import com.thesis.service.UserService;
import com.github.pagehelper.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Anvy at 2020/3/10.
 */
@Service("userService")
public class UserServiceImpl implements UserService {

    @Autowired
    private SysUserMapper userMapper;

    @Override
    public int deleteByPrimaryKey(Long id) {
        return userMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(SysUser record) {
        return userMapper.insert(record);
    }

    @Override
    public int insertSelective(SysUser record) {
        return userMapper.insertSelective(record);
    }

    @Override
    public SysUser selectByPrimaryKey(Long id) {
        return userMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(SysUser record) {
        return userMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(SysUser record) {
        return userMapper.updateByPrimaryKey(record);
    }

    @Override
    public Page<SysUser> findPageList(SysUser record) {
        return userMapper.findPageList(record);
    }

    @Override
    public Page<SysUser> findPageListByVague(SysUser queryParam, String vagueParam) {
        return userMapper.findPageListByVague(queryParam,vagueParam);
    }

    @Override
    public Integer deleteBatchByIds(List<Integer> idList) {
        return userMapper.deleteBatchByIds(idList);
    }

    @Override
    public List<SysUser> checkObj(SysUser record) {
        return userMapper.checkObj(record);
    }

    @Override
    public SysUser findByMobile(String mobile) {
        return userMapper.findByMobile(mobile);
    }

}
